<?php 
/**
 * TomatoCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version 	$Id: show.phtml 5115 2010-08-30 03:09:20Z huuphuoc $
 * @since		2.0.6
 */
?>
<div class="t_core_login">
    <h2><?php echo $this->translator()->widget('login'); ?></h2>
    
    <?php if ($this->user == null) : ?>
    <form class="form" method="post" action="<?php echo $this->url(array(), 'core_auth_login'); ?>">
    	<div class="clearfix">
    		<label for="username"><?php echo $this->translator()->widget('username'); ?></label>
    		<input type="text" name="username" style="width: 150px" />
    	</div>
    	
    	<div class="clearfix">
    		<label for="password"><?php echo $this->translator()->widget('password'); ?></label>
    		<input type="password" name="password" style="width: 150px" />
    	</div>
    	
    	<div class="clearfix">
    		<label for="login">&nbsp;</label>
    		<button type="submit" name="loginButton"><span><?php echo $this->translator()->widget('login_button'); ?></span></button>
    	</div>
    	
    	<div class="clearfix">
    		<label>&nbsp;</label>
    		<a href="<?php echo $this->url(array(), 'core_auth_forgot'); ?>"><?php echo $this->translator()->widget('forgot_password'); ?></a>
    	</div>
    </form>
    <?php else : ?>
    <?php echo sprintf($this->translator()->widget('welcome'), 
    					$this->url(array(), 'core_dashboard_index'), 
    					$this->user->user_name,
    					$this->url(array(), 'core_auth_logout')); ?>
    <?php endif; ?>
</div>
